<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>用户登录</title>
    <style type="text/css">
        .errorlist{
            color:red;
        }
    </style>
</head>
<body>
<h3>用户登录</h3>
<form action="." method="post">
    {% csrf_token %}
{#    {{ form.as_p }}#}
{#    用户名#}
    <div>
        {{ form.username.label }}
        {{ form.username }}
        {{ form.username.errors.as_text }}
    </div>
    {#    密码#}
    <div>
        {{ form.password.label }}
        {{ form.password }}
        {{ form.password.errors.as_text }}
    </div>
    <div>
        {{ form.non_field_errors.as_text }}
    </div>


    <input type="submit" value="登录">
</form>
</body>
</html>